<?php /* @var $this Controller */ ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />

	<title><?php echo CHtml::encode($this->pageTitle); ?></title>

	<?php Yii::app()->bootstrap->register(); ?>
</head>

<body style="padding-top: 60px;">

<?php $this->widget('bootstrap.widgets.TbNavbar',array(
    'type'=>'inverse',
    'brand'=>'Administration',
    'brandUrl'=>array('/admin'),
    'items'=>array(
        array(
            'class'=>'bootstrap.widgets.TbMenu',
            'items'=>array(
                array('label'=>'Home', 'url'=>array('/admin/default/index')),
                array('label'=>'Login', 'url'=>array('/admin/default/login'), 'visible'=>Yii::app()->user->isGuest),
                array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/admin/default/logout'), 'visible'=>!Yii::app()->user->isGuest)
            ),
        ),
    ),
)); ?>

<div class="container" id="page">
	<div class="row">
		<div class="span2 offset1">
			<div id="sidebar">
				<?php
					$this->widget('bootstrap.widgets.TbMenu', array(
						'type'=>'list',
						'items'=>array(
							array('label'=>Yii::t('labels','Home'), 'url'=>array('default/index'), 'icon'=>'home'),
							// Types
							array('label'=>Yii::t('labels','Types')),	//header
							array('label'=>Yii::t('labels','Manage'), 'url'=>array('type/admin'), 'icon'=>'list'),
							array('label'=>Yii::t('labels','Create'), 'url'=>array('type/create'), 'icon'=>'plus'),
		                    // Products
							array('label'=>Yii::t('labels','Categories')),	//header
							array('label'=>Yii::t('labels','Manage'), 'url'=>array('category/admin'), 'icon'=>'list'),
							array('label'=>Yii::t('labels','Create'), 'url'=>array('category/create'), 'icon'=>'plus'),
							// Products
							array('label'=>Yii::t('labels','Products')),	//header
							array('label'=>Yii::t('labels','Manage'), 'url'=>array('product/admin'), 'icon'=>'list'),
							array('label'=>Yii::t('labels','Create'), 'url'=>array('product/create'), 'icon'=>'plus'),					
						),
						'htmlOptions'=>array('class'=>'operations'),
					));
				?>
			</div><!-- sidebar -->
		</div>
		<div class="span8">
			<div id="content">
				<?php if (isset($this->breadcrumbs)): ?>
					<?php $this->widget('bootstrap.widgets.TbBreadcrumbs', array(
						'homeLink'=>CHtml::link(Yii::t('zii', 'Home'), array('/admin/default/index')),
						'links' => $this->breadcrumbs,
				)); ?><!-- breadcrumbs -->
				<?php endif?>
				<?php echo $content; ?>
			</div><!-- content -->
		</div>
	</div>
</div><!-- page -->

</body>
</html>